<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="java.util.*"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="com.test.bean.Student"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Struts2-Demo-欢迎页面</title>
</head>
<% 
	List<Student> studentList = (List<Student>)request.getAttribute("studentList");
	/* System.out.println(" ----- jsp ----- ");
	for(Student student:studentList){
			System.out.println("student_id: "+student.getStudent_id());
			System.out.println("student_name: "+student.getStudent_name());
			System.out.println("studentname: "+student.getStudentName());
			System.out.println("student_bir: "+student.getStudent_birth());
			System.out.println("teacher_id: "+student.getTeacher_id());
		} */
%>
<body>
	Welcome:
	<br>
	<h1>学生列表</h1>
	<a href="addStudent">新增学生</a>
    <a href="updateStudent">更新学生信息1</a>
    <a href="updateStudent2">更新学生信息2</a>
    <a href="addupdateStudent">新增以及更新学生</a>
    <a href="addupdateStudentTranAction">新增以及更新学生Action中</a>
	<table style="width:100%;border:1px white solid">  
    <tr bgcolor="#4F81BD"style="color: #fff;">  
        <th style="text-align: center">序号</th>
        <th style="text-align: center">学生ID</th>  
        <th style="text-align: center">学生姓名</th>
        <th style="text-align: center">生日</th>    
    </tr>  
    <c:forEach items="${studentList}" var="row"  varStatus="status">  
        <tr bgcolor="${status.index%2 == 0?'#D0D8E8':'#E9EDF4'}">  
            <td align="center">${status.index}</td>  
            <td align="center">${row.student_id}</td>
            <td align="center">${row.student_name}</td>
            <td align="center">${row.student_birth}</td>  
        </tr>  
    </c:forEach>  
</table>  

</body>
</html>